#ifndef _BUOLA_CV_CCHAMFER_H
#define _BUOLA_CV_CCHAMFER_H

#include <buola/image/format.h>

namespace buola { namespace cvi {

class CChamfer
{
public:
    CChamfer(const img::CView_gray8 &pIm);

    float GetDistance(const CPoint_d &pP);
    CPoint_i GetClosest(const CPoint_i &pP);
    
private:
    img::CImage_gray8 mEdgesImage;
    img::CImage_gray32f mDistImage;
    img::CImage_xy32s mOriImage;
};

/*namespace cvi*/ } /*namespace buola*/ }

#endif
